package fun.chutianshu.eescore_09_shiro1.mappers;

import fun.chutianshu.eescore_09_shiro1.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PermissionMapper {
    //根据姓名找用户
    @Select("SELECT * FROM Permission WHERE permission_name = #{permission_name}")
    Permission findByName(@Param("permission_name") String role_name);

    //所有用户
    @Select("select * from Permission")
    List<Permission> getAll();
}
